import java.io.File;
import java.io.IOException;

/**
 * Creat by TanLei
 * Description:
 * User:86183
 * Date:2022-06-16
 * Time:13:51
 */
public class Test5 {
    //演示以下文件删除
    public static void main(String[] args) throws IOException {
        File file = new File("./aaa.txt");
        System.out.println(file.exists());
        System.out.println("创建文件之前");
        System.out.println(file.createNewFile());
        System.out.println("创建文件之后");
        System.out.println(file.exists());
        System.out.println("删除文件之前");
        file.delete();
        System.out.println("删除文件之后");
        System.out.println(file.exists());
    }
}
